/*
 * Copyright (c) 2024-2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "sign_block_info.h"

namespace OHOS {
namespace SignatureTools {
    
SignBlockInfo::SignBlockInfo()
{
}

SignBlockInfo::SignBlockInfo(bool needGenerateDigest)
{
    m_needGenerateDigest = needGenerateDigest;
}

std::unordered_map<int8_t, SigningBlock>& SignBlockInfo::GetSignBlockMap()
{
    return m_signBlockMap;
}

std::vector<int8_t>& SignBlockInfo::GetFileDigest()
{
    return m_fileDigest;
}

void SignBlockInfo::SetFileDigest(const std::vector<int8_t>& fileDigest)
{
    m_fileDigest = fileDigest;
}

std::vector<int8_t>& SignBlockInfo::GetRawDigest()
{
    return m_rawDigest;
}

void SignBlockInfo::SetRawDigest(const std::vector<int8_t>& rawDigest)
{
    m_rawDigest = rawDigest;
}

bool SignBlockInfo::GetNeedGenerateDigest()
{
    return m_needGenerateDigest;
}

} // namespace SignatureTools
} // namespace OHOS